package com.homedo.microservice.distributed.id.service.api;


import com.homedo.microservice.distributed.id.service.api.constant.RemoteService4DistributedIdServiceServiceConstant;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@Api(value = "生成ID操作接口", description = "生成ID操作接口")
@RequestMapping(RemoteService4DistributedIdServiceServiceConstant.SERVICE_ID + "/generateId")
public interface IGenerateIdServiceRemote {

    /**
     * 根据业务标志获取对应分布式ID主键 -- 有序主键
     *
     * @param bizTag 业务标志
     * @return
     */
    @GetMapping(value = "regularity/{bizTag}")
    Object regularity(@PathVariable("bizTag") String bizTag, Integer fetchSize);

    /**
     * 根据业务标志获取对应分布式ID主键 -- 无序主键
     *
     * @param bizTag 业务标志
     * @return
     */
    @GetMapping(value = "irregularity/{bizTag}")
    Object irregularity(@PathVariable("bizTag") String bizTag, Integer fetchSize);


}
